//交换数组中的数据
//夏梓豪
//2023/03/31

package code_jiaohuanshuzuzhongdeshuju;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {

        int[] arr = {1,2,3,4,5};

        for (int i = 0,j = arr.length-1; i < j ; i++,j--) {
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }


        for (int n = 0; n < arr.length; n++) {
            System.out.print(arr[n]+"\t");
        }
    }
}
